<template>
    <view class="ptitem" v-if="flag">
        <swiper :class="'ptList ' + (ptList.length == 0 ? 'hidden' : '')" :vertical="true" :autoplay="true" :circular="true" interval="4000">
            <swiper-item :id="'item' + index" class="v-center between stretch item" v-for="(items, index) in ptList" :key="index">
                <view class="ptperson">
                    <view class="members" style="display: flex">
                        <view class="mebList" style="display: flex">
                            <view v-if="index < 1" class="mebItem" v-for="(item, index1) in items.Lst" :key="index1">
                                <image :src="item.Fheadimgurl ? item.Fheadimgurl : '/static/file/images/user_pic.png'"></image>

                                <view v-if="item.Fleader == 1" class="tag">团长</view>
                            </view>
                            <view class="pttime">
                                <view>还剩{{ items.UnpackingOpen.Flastnum }}件即可成功拆箱:</view>
                                <view>
                                    剩余时间
                                    <text v-if="items.UnpackingOpen.obj.day != '00'">{{ items.UnpackingOpen.obj.day }}</text>
                                    <text v-if="items.UnpackingOpen.obj.day != '00'">天</text>
                                    {{ items.UnpackingOpen.obj.hou }}:{{ items.UnpackingOpen.obj.min }}:{{ items.UnpackingOpen.obj.sec }}
                                </view>
                            </view>
                        </view>
                    </view>
                </view>

                <navigator
                    class="navi"
                    :url="'/pages/boxDetail/boxDetail?Fsaid=' + items.UnpackingOpen.Fid + '&Faid=' + items.UnpackingOpen.Fgid + '&Fcode=' + items.UnpackingOpen.Fsaleno"
                    hover-class="none"
                >
                    立刻加入
                </navigator>

                <!-- <button url="/pages/proDetail/proDetail?Ftype=3&Ftypeid={{items.Fid}}" class="ptBtn">立刻加入</button> -->
            </swiper-item>
        </swiper>
    </view>
</template>

<script>
// component/goods/goods.js
export default {
    data() {
        return {
            prop: null,
            flag: false,
            ptList: []
        };
    },
    /**
     * 组件的属性列表
     */
    props: {
        con: {
            type: Object
        }
    },
    mounted() {
        // 处理小程序 ready 生命周期
        this.$nextTick(() => this.ready());
    },
    /**
     * 组件的方法列表
     */
    methods: {
        ready: function () {},

        //购买跳商品详情页
        showPopup() {
            var that = this;
			that.flag = true;
        },

        hidePopup() {
			that.flag = false; 
        }
    },
    created: function () {},
    watch: {
        con: {
            handler: function (e) {
				this.ptList = e; 
            },

            immediate: true,
            deep: true
        }
    }
};
</script>
<style>
@import './banner.css';
</style>
